﻿using S.Initial.Domain;
using S.Initial.Infrastructure.Dto;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace S.Initial.Infrastructure.Interface
{
    public interface IBreedingMothersRepository
    {
        /// <summary>
        /// 用于获取数据库连接对象
        /// </summary>
        IDbConnection Connection { get; }
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="Breedingmothers"></param>
        Task<int> AddAllBreedingmothers(List<BreedMaleAndFemaleStart> Breedingmothers);
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="Id"></param>
        Task<int> DeleteBreedingmothers(int Id);
        /// <summary>
        /// 查询全部信息
        /// </summary>
        /// <returns></returns>
        Task<(IEnumerable<BreedMaleAndFemaleStart> items, int totalCount, int pageCount)> GetAllBreedingmothersBy(int Type, string EarTag, string? KaiDate, string? JieDate, int page, int size);
        /// <summary>
        /// 根据ID查询
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        Task<BreedMaleAndFemaleStart> GetBreedingmothersByIdAsync(int Id);
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="Breedingmothers"></param>
        Task<int> UpdateBreedingmothers(BreedMaleAndFemaleStart Breedingmothers);
        /// <summary>
        /// 批量删除
        /// </summary>
        /// <param name="startIds"></param>
        /// <returns></returns>
        Task<int> DeleteAllBreedingmothers(IEnumerable<string> startIds);
        /// <summary>
        /// 审核
        /// </summary>
        /// <param name="breedMaleAndFemaleStart"></param>
        /// <returns></returns>
        Task<int> AddauditBy(BreedMaleAndFemaleStart breedMaleAndFemaleStart);
        /// <summary>
        /// 存栏统计
        /// </summary>
        /// <returns></returns>
        Task<IEnumerable<InventoryStatisticsDto>> ShowInventoryStatistics(string? Type, int Variety, DateTime? KDate, DateTime? JDate, string? Cha, string? ChaZhi, int pageNumber, int pageSize);
        /// <summary>
        /// 查询条件值
        /// </summary>
        /// <param name="Generic"></param>
        /// <returns></returns>
        Task<IEnumerable<InventoryStatisticsDto>> ShowChaZhiStatistics(string? Generic);


    }
}
